home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / QuickDraw 3D / Windows files / Q3WinSDK.exe / QD3DSDK / Samples / Win32Sample / Box3DSupport.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-18  |  2.9 KB  |  90 lines

  1. // Box3dSupport.c - QuickDraw 3d routines - interface
  2. //
  3. // This file contains
  4. //
  5. // Created 27th Dec 1994, Nick Thompson, DEVSUPPORT
  6. //
  7. // Modification History:
  8. //
  9. //    12/27/94        nick        initial version
  10.  
  11. #ifndef _BOX3DSUPPORT_H_
  12. #define _BOX3DSUPPORT_H_
  13.  
  14. #include <windows.h>
  15.  
  16. // QuickDraw 3D stuff
  17. #include "QD3D.h"            // QuickDraw 3D lives in here
  18. #include "QD3DIO.h"
  19. #include "QD3DErrors.h"
  20. #include "QD3DMath.h"
  21. #include "QD3DDrawContext.h"
  22. #include "QD3DShader.h"
  23. #include "QD3DTransform.h"
  24. #include "QD3DGroup.h"
  25. #include "QD3DRenderer.h"
  26. #include "QD3DCamera.h"
  27. #include "QD3DLight.h"
  28. #include "QD3DGeometry.h"
  29. #include "QD3DSet.h"
  30. #include "QD3DAcceleration.h"
  31. #include "QD3DStorage.h"
  32. #include "QD3DView.h"
  33.  
  34. enum
  35. {
  36.     kA3BtnZoom        = 1,
  37.     kA3BtnRotate,
  38.     kA3BtnPan
  39. };
  40.  
  41.  
  42. struct _documentRecord
  43. {
  44.     TQ3ViewObject    fView ;                // the view for the scene
  45.     TQ3GroupObject    fModel ;            // object in the scene being modelled
  46.     TQ3StyleObject    fInterpolation ;    // interpolation style used when rendering
  47.     TQ3StyleObject    fBackFacing ;        // whether to draw shapes that face away from the camera
  48.     TQ3StyleObject    fFillStyle ;        // whether drawn as solid filled object or decomposed to components
  49.     TQ3Matrix4x4    fRotation;            // the transform for the model
  50.     TQ3ShaderObject    fIllumination;
  51.     TQ3Boolean        spin;                // spinning on
  52.  
  53.     unsigned long    rendererType;        // kQ3RendererTypeWireFrame or kQ3RendererTypeInteractive 
  54.     unsigned long    drawcontextType;    // kQ3DrawContextTypePixmap
  55.                                         // kQ3DrawContextTypeWin32DC
  56.                                         // or kQ3DrawContextTypeDDSurface
  57.  
  58.     HWND            fWindow;            // destination window to blit offscreen buffer onto
  59.     unsigned long    fWidth;
  60.     unsigned long    fHeight;
  61.     unsigned char    clearColorR;
  62.     unsigned char    clearColorG;
  63.     unsigned char    clearColorB;
  64.     TQ3PixelType    fPixelFormat;
  65.  
  66.     /* used with Pixmap Draw Context only */
  67.     HDC                fMemoryDC;            // memory device context for offscreen buffer
  68.     HBITMAP            fBitmap;            // offscreen bitmap to draw into (really a pixelmap)
  69.     void            *fBitStorage;        // storage for bits in offscreen bitmap (pixelmap)
  70. };
  71.  
  72. typedef struct _documentRecord DocumentRec, *DocumentPtr ;
  73.  
  74. //---------------------------------------------------------------------------------------
  75.  
  76. TQ3ViewObject             MyNewView(DocumentPtr theDocument) ;
  77. TQ3Status MyResizeView( DocumentPtr theDocument,unsigned long width, unsigned long height );
  78. TQ3Status MyDeleteView( DocumentPtr theDocument );
  79. TQ3DrawContextObject NewPixmapDrawContext( DocumentPtr theDocument, TQ3PixelType pixelFormat );
  80. TQ3DrawContextObject    NewWin32DCDrawContext(DocumentPtr theDocument) ;
  81. TQ3CameraObject         MyNewCamera(DocumentPtr theDocument) ;
  82. TQ3GroupObject            MyNewLights(void) ;
  83. TQ3GroupObject             MyNewModel(void) ;
  84.  
  85. void pvCamera_Fit(DocumentPtr theDocument);
  86. void pvBBoxCenter(TQ3BoundingBox *bbox, TQ3Point3D *center);
  87. void pvBBox_Get(DocumentPtr theDocument, TQ3BoundingBox *bbox);
  88.  
  89. #endif
  90.